feat: redesign homepage as multi-language platform hub#2
Conversation
Not wiring up Cloudflare Pages at this stage. Signed-off-by: Krishan Kant Sharma <krishansharma0327@gmail.com>
Add JS/Go SDK cards, update GitHub links to flaglint-js, fetch live CLI version from npm at build time. Signed-off-by: Krishan Kant Sharma <krishansharma0327@gmail.com>
📝 WalkthroughWalkthroughUpdated the homepage to fetch the displayed version from npm, refresh structured data and repository links, revise hero text, add Language SDKs cards, and extend styles for the new section. ChangesHomepage refresh
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Deploying flaglint with
|
| Latest commit: |
226ee23
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bf37299d.flaglint.pages.dev |
| Branch Preview URL: | https://feat-platform-homepage.flaglint.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/index.astro`:
- Around line 2-9: The npm registry lookup in the index page version fetch can
hang indefinitely because the current try/catch only handles rejected requests.
Update the fetch logic around the version initialization in the Astro page to
use a bounded request with a timeout so the fallback version is reached if the
registry is slow or stalls. Use the existing fetch/version retrieval block as
the place to add the timeout handling and keep the hardcoded fallback path
intact.
- Around line 15-16: The page metadata is still using the old Node.js-only CLI
wording, so update the description fields in the index page metadata and OG tags
to match the new FlagLint hub messaging. Fix the relevant values in the index
page’s frontmatter/metadata and the `og:description` entry so search snippets
and social previews reflect the multi-language platform positioning used by the
JSON-LD and hero content.
- Around line 2-6: The page now fetches a dynamic version in the `version`
variable, but other displayed copy still hardcodes `v1.0.0`. Update the hero
terminal and any other version text in `src/pages/index.astro` to use the
fetched `version` value consistently everywhere it is rendered, so the page
shows one source of truth instead of mixed versions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8ad65337-dcc8-4956-8f44-4bc6ff39c32b
📒 Files selected for processing (2)
.github/workflows/deploy.ymlsrc/pages/index.astro
💤 Files with no reviewable changes (1)
- .github/workflows/deploy.yml
| let version = "1.0.0"; | ||
| try { | ||
| const res = await fetch("https://registry.npmjs.org/flaglint/latest"); | ||
| const data = await res.json(); | ||
| version = data.version ?? "1.0.0"; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use the fetched version everywhere it’s displayed.
You now source version dynamically, but the hero terminal still hardcodes flaglint v1.0.0 on Line 981. As soon as npm publishes a newer release, the page will show two different versions at once.
Also applies to: 1020-1022
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/index.astro` around lines 2 - 6, The page now fetches a dynamic
version in the `version` variable, but other displayed copy still hardcodes
`v1.0.0`. Update the hero terminal and any other version text in
`src/pages/index.astro` to use the fetched `version` value consistently
everywhere it is rendered, so the page shows one source of truth instead of
mixed versions.
| let version = "1.0.0"; | ||
| try { | ||
| const res = await fetch("https://registry.npmjs.org/flaglint/latest"); | ||
| const data = await res.json(); | ||
| version = data.version ?? "1.0.0"; | ||
| } catch { | ||
| // fallback to hardcoded | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Add a timeout to the npm registry lookup.
The try/catch only handles failures that eventually reject. If the registry stalls, the build can sit on Line 4 indefinitely even though you already have a fallback version. Bound this fetch so deploys don’t depend on npm responsiveness.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/index.astro` around lines 2 - 9, The npm registry lookup in the
index page version fetch can hang indefinitely because the current try/catch
only handles rejected requests. Update the fetch logic around the version
initialization in the Astro page to use a bounded request with a timeout so the
fallback version is reached if the registry is slow or stalls. Use the existing
fetch/version retrieval block as the place to add the timeout handling and keep
the hardcoded fallback path intact.
| description: | ||
| "Free, open-source CLI that finds every direct LaunchDarkly Node.js SDK call, ranks them by migration risk, and generates safe OpenFeature rewrites.", | ||
| "Free, open-source CLI that finds every direct LaunchDarkly SDK call, ranks them by migration risk, and generates safe OpenFeature rewrites.", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Refresh the HTML/OG descriptions to match the new hub messaging.
The JSON-LD and hero now position FlagLint as a multi-language platform, but the HTML description and og:description on Lines 34-36 still describe a Node.js-only CLI. Search/snippet previews will keep advertising the old positioning.
Also applies to: 947-951
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/index.astro` around lines 15 - 16, The page metadata is still using
the old Node.js-only CLI wording, so update the description fields in the index
page metadata and OG tags to match the new FlagLint hub messaging. Fix the
relevant values in the index page’s frontmatter/metadata and the
`og:description` entry so search snippets and social previews reflect the
multi-language platform positioning used by the JSON-LD and hero content.
Summary
Test plan
npm run buildpassesSummary by CodeRabbit
New Features
Content Updates